package com.program.beautymakeup.controller.wxController;

import com.program.beautymakeup.domain.vo.ResultInfo;
import com.program.beautymakeup.mapper.ConfigurationMapper;
import com.program.beautymakeup.utils.ResultInfoUtil;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author bytedance
 * @ClassName OtherController.java
 * @Description TODO
 * @createTime 2023年02月09日 22:45:00
 */
@Slf4j
@RestController
@RequiredArgsConstructor
@RequestMapping("/others")
public class OtherController {

    @Autowired
    private ConfigurationMapper configurationMapper;

    @GetMapping("/img")
    public ResultInfo getOthersImg(@RequestParam(value = "key",required = true) String key) {
        return ResultInfoUtil.buildSuccess(configurationMapper.selectByName(key));
    }
}
